package com.teach;

/**
 * <pre>
 * -
 * Author : J.L.Zhou
 * E-Mail : 2233875735@qq.com
 * Tel : 151 1104 7708
 * Date : 2021-04-13 15:16
 * Version : 1.0
 * Copyright 2021 jlzhou.top Inc. All rights reserved.
 * Warning: this content is only for internal circulation of the company.
 *          It is forbidden to divulge it or use it for other commercial purposes.
 * </pre>
 **/
public class Student {
  private String name;

  public Student(String name) {
    this.name = name;
  }

  /**
   * 对象被回收之前调用的
   * @throws Throwable
   */
  @Override
  protected void finalize() throws Throwable {
    System.out.println("正在销毁:"+this);
  }

  @Override
  public String toString() {
    return super.toString()+"{" +
        "name='" + name + '\'' +
        '}';
  }
}
